(*
	searchVideo frame - Go to the frame indicated, blanking the display if indicated by global
		variable blankNextVideo being set to true.

	To compile and link this file using Macintosh Programmer's Workshop,

		pascal -w searchVideo.p

		link -m ENTRYPOINT -o HyperCommands -rt XCMD=8004 -sn Main=searchVideo ¶
			searchVideo.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o

	Copyright © 1987,88 Apple Computer, Inc.

	9/87 - Initial coding by Harry R. Chesley.
	2/88 - Changed for new interface specification by Harry R. Chesley.
*)

{$R-}

{$S searchVideo } 	{ Segment name must be the same as the command name. }

unit DummyUnit;

interface

uses MemTypes, QuickDraw, OSIntf, HyperXCmd;

procedure EntryPoint(paramPtr: XCmdPtr);
	
implementation

type

Str31 = String[31];

procedure searchVideo(paramPtr: XCmdPtr); forward;

procedure EntryPoint(paramPtr: XCmdPtr);

	begin
		searchVideo(paramPtr);
	end;

procedure searchVideo(paramPtr: XCmdPtr);

	var numberOfParms: integer;
		frameNumber: str255;

	{$I XCmdGlue.inc}

	procedure Fail(errMsg: Str255); { set theResult and quit }
		begin
			paramPtr^.returnValue := PasToZero(errMsg);
			exit(searchVideo);
		end;

	{$I VideoUtil.inc}

	begin
		numberOfParms := paramPtr^.paramCount;
		if (numberOfParms <> 1) then Fail('parameter count is not 1');

		{ Get the frame to search to. }
		GetStrParm(1,frameNumber);
		if StrToNum(frameNumber) < 0 then frameNumber := '0';

		{ Do it...}
		videoCmd('search',frameNumber);
	end;

end.
